<!doctype html>
<html>

<head>
  <meta charset="UTF-8">
  <title>门店投币</title>
  <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  <link href="../css/mui.min.css" rel="stylesheet" />
  <link rel="stylesheet" href="../css/timecheck.css" />
  <link rel="stylesheet" href="../fonts/iconfont.css" />
  <script>
    var width =window.localStorage.getItem('width');
    document.documentElement.style.fontSize =  width ? width/6.4+  'px' :'55px';
  </script>
  <style>
    html,
    body,
    #app {
      width: 100%;
      /*height: 100%;*/
    }
    #app{
      padding-bottom: 0.35rem;
    }


    table {
      font-size: 0.22rem;
      width: 100%;
      text-align: center;
      margin-top: 0.1rem;
    }
    table tr td{
      padding: 0.1rem 0;
      height: 0.8rem;
      font-size: 0.2rem;
    }
    table,
    table,
    tbody,td div{
      text-align: center;
    }
    td span{
      display: inline-block;
      text-align: left;
      vertical-align: middle;
    }

    .form .float p{
      margin: 0 0 0.05rem;
      color:black;
      font-size: 0.22rem;
    }
    .borderRight1{
      border-right:1px solid #CCCCCC ;
    }
    .formTitle{
      font-size: 0.26rem;
      margin: 0 0 0.1rem;
    }
    .totalForm{
      width: 100%;
      text-align: center;
      font-size: 0.22rem;
    }
    .totalForm>p{
      width: 100%;
      color:black;
    }
    .totalForm>p:first-child{
      font-size: 0.26rem;
    }
    .totalForm p{
      margin: 0;
    }
    .totalForm .formFlex{
      display: flex;
      margin-top: 0.1rem;
    }
    .formFlex .flexItem{
      width: 33%;
    }
    .colorBlack{
      color:black
    }
    .mui-icon-arrowthindown::before{
      height: 0.2rem;
    }
    .scanForm{
      width: 100%;
      display: flex;
      justify-content:space-around
    }
    .scanDiv{
      width: 100%;
      text-align: center;
      background-color: #F7F7F7;
      border-radius: 0.2rem;
      padding-top: 0.2rem;
    }
    .fixed{
      position: fixed;
      top:0.67rem;
      width: 100%;
      font-size: 0.2rem;
      background-color: white;
      z-index: 999;
    }
    .fixed span{
      display: inline-block;
      text-align: center;
      height: 0.8rem;
      line-height: 0.8rem;
    }
    .display{
      display: none;
    }
    .choose{
      width: 1rem;
      margin: 0;
      text-align: center;
      padding: 0.02rem ;
      font-size: 0.18rem;
      background-color: white;
      border: 1px solid #ED7D31;
    }
    .chooseList{
      text-align: center;
      background-color: white;
      border-left: 1px solid #ED7D31;
      border-right: 1px solid #ED7D31;

    }
    .chooseList p{
      width:100%;
      margin: 0;
      padding: 0.02rem;
      border-bottom: 1px solid #ED7D31;
      font-size: 0.18rem;
      color:black;
    }
    .chooseList  .default{
      color:white;
      background-color: #ED7D31 ;
    }
    .jiantou{
      position: absolute;
      top:0.1rem;
      right: 0.3rem;
      width: 0.3rem;
    }
    .jiantou  img{
      width: 0.3rem;
    }
    .chooseDiv{
      color:#FF6800;
      padding: 0.2rem 0.1rem;
      margin-top: 0.05rem;
      background-color: white;
      position: relative;
      font-size: 0.24rem;
    }
    .chooseDiv img{
      width: 0.2rem;
      position: absolute;
    }
    .chooseDiv img:first-child{
      top:0.23rem;
      left: 0.2rem;
    }
    .chooseDiv img:last-child{
      top:0.23rem;
      right: 0.3rem;
    }
    .chooseDiv span{
      display: inline-block;
      height: 100%;
      line-height: 100%;
      clear: both;
      position: relative;
      left: 0.4rem;
    }
    .storeChoose{
      width: 50%;
      margin: 0.2rem auto 0;
      border: 1px solid #ccc;
      font-size: 0.2rem;
      text-align: center;
      background-color: white;
      overflow: hidden;

    }
    .storeChoose span{
      display: inline-block;
      width: 50%;
      padding: 0.05rem 0;
      float: left;
    }
    .storeChoose .default{
      background-color: #ccc ;
    }
    .deviceBox{
      width: 100%;
      padding: 0 0.2rem ;
      margin-top: 0.3rem;
      font-size: 0.24rem;
      overflow: hidden;
    }
    .deviceBox div{
      float: left;
    }
    .chooseDeviceList{
      width: 80%;
      border-bottom:1px solid #ccc ;
      overflow: hidden;
      text-overflow: ellipsis;
      -o-text-overflow: ellipsis;
      white-space:nowrap;
      height:24px;
      display:block;
    }
    .deviceChoose{
      width: 18%;
      margin-left: 2%;
      background-color: white;
      border: 1px solid #ff6800;
      text-align: center;
    }
    .rankingTable{
      width: 100%;
      margin-top: 0.2rem;
    }
    .rankingTable tr {
      height: 0.2rem;
    }
    .giftTd{
      position: relative;
    }
    .giftTd img{
      width:  0.5rem;
      position: absolute;
      left: -0.1rem;
      top:0.15rem;
    }
    .giftTd span{
      width: 1.8rem;/**/
      display: inline-block;
      margin-left: 0.4rem;
      /*padding: 0.1rem 0;*/
      /*position: absolute;*/
      /*right: -0.2rem;*/
      /*top:0;*/

    }
    .bgWhite{
      background-color: white;
    }
    .deviceList{
      width: 100%;
      height: 100%;
      position: fixed;
      top:0;
      background-color: #efeff4;
      z-index: 9999;
      font-size: 0.24rem;
    }
    .deviceList img{
      width: 0.3rem;
    }
    .deviceList table{
      margin: 0;
    }
    .deviceList tr td:nth-child(1){
      padding: 0.13rem 0.2rem 0  0;
      width: 10%;
      text-align: right;
    }
    .deviceList tr td:nth-child(2){
      width: 30%;
      text-align: left;
    }
    .deviceList tr td:nth-child(3){
      width: 30%;
      text-align: left;
      color: rgba(0, 0, 0, 0.51);
    }
    .deviceList tr td:nth-child(4){
      width: 20%;
      text-align: right;
      padding-right: 0.3rem;
      color: rgba(0, 0, 0, 0.51);
    }

    /*修改选择框样式*/
    input[type="checkbox"]{
      width:0.32rem;
      height:0.3rem;
      display: inline-block;
      text-align: center;
      vertical-align: middle;
      line-height: 18px;
      position: relative;
    }
    input[type="checkbox"]::before{
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      background: #fff;
      width: 100%;
      height: 100%;
      border: 1px solid #d9d9d9
    }
    input[type="checkbox"]:checked::before{
      content: "\2713";
      position: absolute;top: 0;
      left: 0;
      width:100%;
      border: none;
      color:#fff;
      background-color: #5677FC;
      font-size: 0.18rem;
      font-weight: bold;
    }
    .query{
      width: 100%;
      position: absolute;
      bottom:0;
      background-color: white;
      padding: 0 10%;
      display: flex;
      justify-content:center ;
    }
    .queryBtn{
      width: 30%;
      height: 0.6rem;
      border-radius: 0.3rem;
      line-height: 0.6rem;
      text-align: center;
      color:white;
      background-color: #ff6800;
      margin: 0.2rem auto;

    }
    .query .queryBtn:nth-child(2){
      background-color: #ccc;
    }

    .tips{
      width: 100%;
      height: 0.4rem;
      line-height: 0.4rem;
      background-color: rgba(255, 104, 0, 0.32);
      color:red;
      padding-left: 0.2rem;
      margin-top: 3.25rem;
    }
    .colorGray{
      color: #9c9c9c;
    }
    .allBtn{
      width: 1rem;
      font-size: 0.22rem;
      border-radius: 0.2rem;
      border: 1px solid black;
      text-align: center;
      float: right;
      margin-right: 0.12rem;
      margin-top: 0.12rem;
      color:black;
    }

    .myTable{
      width: 100%;
      margin-top: 0.05rem;
      padding-bottom: 2rem;
    }
    .myTable .row{
      width: 100%;
      overflow: hidden;

    }

    .myTable .row p{
      float: left;
      margin: 0;
      text-align: center;
      font-size: 0.19rem;
      color: #8f8f94;
      height: 0.7rem;
      display: flex;
      align-items: center;
      justify-content:space-around;
      flex-wrap:wrap
    }
    .footerFixed{
      width: 100%;
      position: fixed;
      bottom: 0;
      border-top: 1px solid #BBBBBB;
      background-color: white;
      padding: 0.2rem 0.1rem 0.1rem;

    }
    .footerFixed p{
      float: left;
      margin-bottom: 0.1rem;
      font-size: 0.2rem;
      text-align: center;
      color:black;
    }
    .bglight {
      background-color: #FFFFFF;
    }

    .choiceDiv{
      font-size:0.22rem;
    }
    .choiceList{
      overflow: hidden;
      margin: 0.2rem auto 0.2rem;
      padding:0 15%;
    }
    .choiceItem{
      width:50%;
      background-color: white;
      float: left;
      text-align: center;
      padding: 0.05rem 0;
      border:1px solid #E1E1E1 ;
    }
    .choiceList .default{
      background-color:#E1E1E1 ;
    }
    .choiceList2{
      overflow: hidden;
      margin: 0 auto 0.1rem;
      padding:0 20%;
    }
    .choiceItem2{
      float: left;
      padding: 0 0 0.1rem;
      position: relative;
      /*font-size: 0.28rem;*/
      width: 50%;
    }
    .choiceItem2:first-child  .mui-radio{
      margin-left: 0.4rem;

    }

    .choiceItem2 .mui-checkbox input[type=checkbox],.choiceItem2 .mui-radio input[type=radio]{
      width: 0.24rem;
      height: 0.24rem;
      left: 0;
      top:-0.02rem
    }
    .choiceItem2 .mui-checkbox input[type=checkbox]:before,.choiceItem2 .mui-radio input[type=radio]:before{
      font-size:0.26rem
    }
    .choiceItem2 .mui-input-row label{
      margin-left: 0.3rem;
      padding: 0;
    }
    .loadingDiv{
      width: 100%;
      height: 8.5rem;
      background-color: #EFEFF4;
      position: absolute;
      top:4.3rem;
      left: 0;
      font-size: 0.28rem;
      text-align: center;
      line-height: 3rem;
    }



  </style>
</head>

<body>
<script src="../js/echarts.common.min.js" ></script>
<script src="../js/vue.min.js" ></script>
<script src="../config.js" ></script>
<script src="../common/timeCheck2.js" ></script>
<script src="../js/mui.min.js"></script>
<div id="app" class="mui-content" style=" min-height: 100%;min-width: 100%; position: absolute;top: 0px;bottom: 0px;" >
  <time-check :type="3"  :dateType="dateType"  :actnum="actnum" :fromdate="fromDate" :todate='toDate'  :chooseshow="true"></time-check>
  <div>
    <div class="choiceDiv">
      <div class="choiceList">
        <div class="choiceItem" :class="{default : outType === 1 }" @click="changeOutType(1)" >套餐销售</div>
        <div class="choiceItem" :class="{default : outType === 2 }" @click="changeOutType(2)" style="margin-left: -1px">设备收款</div>
      </div>
      <div class="choiceList2" v-show="outType ===1">
        <div class="choiceItem2"  @click="changeInterType(1)">
          <div class="mui-input-row mui-radio  " >
            <input class="radio1" name="radio1 " type="radio"  checked="true" >
            <label>会员购币</label>
          </div>
        </div>
        <div class="choiceItem2"  @click="changeInterType(2)">
          <div class="mui-input-row mui-radio ">
            <input class="radio1" name="radio1" type="radio"  >
            <label>散客购币</label>
          </div>
        </div>


      </div>
    </div>
    <div class="myTable">
      <!--设备收款-->
      <div  v-show="outType === 2">
        <div class="row" style="background-color: white">
          <p :style="{'width':isAlltypeHaveMoney?'29%':'35%','color':'black'}">设备</p>
          <p :style="{'width':isAlltypeHaveMoney?'14%':'15%','color':'black'}">实收</p>
          <p :style="{'width':isAlltypeHaveMoney?'14%':'15%'}">现金</p>
          <p :style="{'width':isAlltypeHaveMoney?'14%':'15%'}"
            v-if="originalData.totalWeChatMoney>0||(storePayType===1&&isAlltypeNoMoney)"
          >微信</p>
          <p :style="{'width':isAlltypeHaveMoney?'14%':'15%'}"
             v-if="originalData.totalShouqianba>0||(storePayType===2&&isAlltypeNoMoney)"
          >收钱吧</p>
          <p :style="{'width':isAlltypeHaveMoney?'15%':'20%','color':'black'}">钻/卡提币</p>
        </div>
        <div class="row"  @click="toATMDetails(item)" v-for="(item,index) in ATMlist" :class="{bglight:index%2===1}" style="padding: 0.1rem 0" >
          <p :style=" {'width': isAlltypeHaveMoney?'29%':'35%','display': 'flex','align-items': 'center', 'justify-content':'space-around','color':'black'}">
            <img  v-show="item.state ===1" style="width: 0.2rem; " src="../images/troubleflag-green.png" alt="">
            <img  v-show="item.state ===0" style="width: 0.2rem; " src="../images/troubleflag-gray.png" alt="">
            <span style="vertical-align:middle;text-align: center;word-wrap : break-word;display: block;width: 1.4rem;">{{item.deviceName}}</span>
          </p>
          <p :style="{'width':isAlltypeHaveMoney?'14%':'15%','color':'black'}">{{(item.money/100).toFixed(2)}}</p>
          <p :style="{'width':isAlltypeHaveMoney?'14%':'15%'}">{{(item.cashMoney/100).toFixed(2)}}</p>
          <p :style="{'width':isAlltypeHaveMoney?'14%':'15%'}"
             v-if="originalData.totalWeChatMoney>0||(storePayType===1&&isAlltypeNoMoney)">{{(item.weChatMoney/100).toFixed(2)}}</p>
          <p :style="{'width':isAlltypeHaveMoney?'14%':'15%'}"
             v-if="originalData.totalShouqianba>0||(storePayType===2&&isAlltypeNoMoney)">{{(item.shouqianba/100).toFixed(2)}}</p>
          <!--<p style="width:20%;" :style="{color:color(parseFloat(item.differenceCoin))}" >{{item.DiamondCardCoin}}</p>-->
          <p :style="{'width':isAlltypeHaveMoney?'15%':'20%','color':'black'}" >{{item.diamondCardCoin}}</p>
          <p style="height: auto;border-top:1px solid #BBBBBB;width: 100%;">
          <span style="display: block;width: 100%;text-align: left;margin-left: 0.1rem">
              查询周期内最后抄表时间：{{ item.date !== '--' ?  new Date(item.date).format('yyyy-MM-dd hh:mm') : '--'}}
          </span>
          </p>
        </div>
      </div>
      <!--套餐销售 -->
      <div v-show="outType === 1 ">
        <div class="row" style="background-color: white">
          <p style="width:20%;color:black">金额</p>
          <p style="width:20%;color:black">人数</p>
          <p style="width:20%;">笔数</p>
          <p style="width:20%;">收入</p>
          <p style="width:20%;">ARPPU</p>
        </div>
        <div v-show="isCheck === 1"  class="row"   v-for="(item,index) in mealInfo.saleVip.saleMeal" :class="{bglight:index%2===1}" style="padding: 0.1rem 0" >
          <p style=" width: 20%;color:black">{{item.mealName}}</p>
          <p style="width:20%;color:black">{{(item.buyPeople)}}</p>
          <p style="width:20%;">{{(item.buyNumber)}}</p>
          <p style="width:20%;">{{(item.buyMoney/100).toFixed(2)}}</p>
          <p style="width:20%;">{{(item.buyArppu/100).toFixed(2)}}</p>
        </div>
        <!--散客购币 列表 人数 和 arppu为 --  -->
        <div v-show="isCheck === 2" class="row"   v-for="(item,index) in mealInfo.saleScattered.saleMeal" :class="{bglight:index%2===1}" style="padding: 0.1rem 0" >
          <p style=" width: 20%;color:black">{{item.mealName}}</p>
          <!--<p style="width:20%;color:black">{{(item.buyPeople)}}</p>-->
          <p style="width:20%;color:black">--</p>
          <p style="width:20%;">{{(item.buyNumber)}}</p>
          <p style="width:20%;">{{(item.buyMoney/100).toFixed(2)}}</p>
          <!--<p style="width:20%;">{{(item.buyArppu/100).toFixed(2)}}</p>-->
          <p style="width:20%;">--</p>
        </div>
      </div>
    </div>
    <div v-show="outType === 2" class="footerFixed" >
      <div style="display: flex">
        <p style="flex: 1;text-align: left">实收：{{(originalData.totalMoney/100).toFixed(2)}}</p>
        <p style="flex: 1;text-align: left">现金： {{(originalData.totalCashMoney/100).toFixed(2)}} </p>
        <p style="flex: 1;text-align: left"  v-if="originalData.totalWeChatMoney>0||(storePayType===1&&isAlltypeNoMoney)">微信：{{(originalData.totalWeChatMoney/100).toFixed(2)}} </p>
        <p style="flex: 1;text-align: left"  v-if="originalData.totalShouqianba>0||(storePayType===2&&isAlltypeNoMoney)">收钱吧：{{(originalData.totalShouqianba/100).toFixed(2)}} </p>
      </div>
      <div>
        <p style="text-align: left">钻石/会员卡提币：{{originalData.totalDiamondCardCoin}}</p>
        <!--<p style="float: right;text-align: right" :style="{color:color(parseFloat(originalData.totalDifferenceCoin))}">{{originalData.totalDifferenceCoin}}</p>-->
      </div>
    </div >
    <div v-show="outType === 1 && isCheck === 1"  class="footerFixed">
      <div style="width: 100%">
        <p style="width: 30%;text-align: left">销售额：{{mealInfo.saleVip.saleMoney !== '--' ? (mealInfo.saleVip.saleMoney/100).toFixed(2) : mealInfo.saleVip.saleMoney}}</p>
        <p style="width: 20%;text-align: center">笔数： {{(mealInfo.saleVip.saleNumber)}} </p>
        <p style="width: 20%;text-align: right">人数：{{mealInfo.saleVip.salePeople}} </p>
        <p style="width: 30%;text-align: right">ARPPU：{{mealInfo.saleVip.saleArppu !=='--'  ?  (mealInfo.saleVip.saleArppu/100).toFixed(2) : mealInfo.saleVip.saleArppu}} </p>
      </div>
      <div>
        <p style="width: 40%;text-align: left">实收RMB：{{ mealInfo.saleVip.realMoney !=='--'  ?  (mealInfo.saleVip.realMoney/100).toFixed(2) : mealInfo.saleVip.realMoney}}</p>
        <p style="width: 40%;text-align: left;">回收钻石：{{mealInfo.saleVip.saleDiomMoney !=='--' ? (mealInfo.saleVip.saleDiomMoney/100).toFixed(2) : mealInfo.saleVip.saleDiomMoney}}</p>
        <!--<p style="float: right;text-align: right" :style="{color:color(parseFloat(originalData.totalDifferenceCoin))}">{{originalData.totalDifferenceCoin}}</p>-->
      </div>
    </div>
    <div v-show="outType === 1 && isCheck === 2"  class="footerFixed">
      <div style="width: 100%">
        <p style="width: 30%;text-align: left">销售额：{{ mealInfo.saleScattered.saleMoney !=='--'  ? (mealInfo.saleScattered.saleMoney/100).toFixed(2) : mealInfo.saleScattered.saleMoney}}</p>
        <p style="width: 20%;text-align: center">笔数： {{(mealInfo.saleScattered.saleNumber)}} </p>
        <p style="width: 20%;text-align: right">人数：{{  mealInfo.saleScattered.salePeople}} </p>
        <p style="width: 30%;text-align: right">ARPPU：{{ mealInfo.saleScattered.saleArppu !=='--'  ? (mealInfo.saleScattered.saleArppu/100).toFixed(2) : mealInfo.saleScattered.saleArppu}} </p>
      </div>
      <div>
        <p style="width: 40%;text-align: left">实收RMB：{{ mealInfo.saleScattered.realMoney !=='--'  ? (mealInfo.saleScattered.realMoney/100).toFixed(2) :'--'}}</p>
        <p style="width: 40%;text-align: left;">回收钻石：{{mealInfo.saleScattered.saleDiomMoney !== '--' ? (mealInfo.saleScattered.saleDiomMoney/100).toFixed(2) : mealInfo.saleScattered.saleDiomMoney}}</p>
        <!--<p style="float: right;text-align: right" :style="{color:color(parseFloat(originalData.totalDifferenceCoin))}">{{originalData.totalDifferenceCoin}}</p>-->
      </div>
    </div>
    <!--加载中-->
    <div class="loadingDiv" v-show="isLoading">
      加载中
    </div>
    <!--暂无数据-->
    <p v-show=" (ATMlist.length === 0 && outType === 2) || (mealInfo.saleVip.saleMeal.length === 0 && isCheck === 1 && outType === 1) ||  (mealInfo.saleScattered.saleMeal.length === 0 && isCheck === 2 && outType === 1)" style="width: 100%;text-align: center;height: 0.5rem;line-height: 0.8rem">
      暂无数据
    </p>



  </div>

</div>
<script type="text/javascript">
  mui.init();
  var vm = new Vue({
    el: '#app',
    data: function() {
      return {
        storePayType:'',//店铺收款类型 1：微信 2：收钱吧
        isAlltypeNoMoney:'',//是否微信和收钱吧都无收款
        isAlltypeHaveMoney:'',//是否微信和收钱吧都有收款
        actnum:'',
        fromDate:'',
        toDate:'',
        dateType:'',
        originalData:'',
        ATMlist:'',
        isCheck:1,  //1.会员购币  2.散客购币
        outType:1,  //1.套餐销售 2.设备收款
        isLoading:false,
        mealInfo:{
          saleScattered:{
            saleMeal:[]
          },
          saleVip:{
            saleMeal:[]
          },
        },  //套餐销售信息
      }
    },
    created:function() {
      mui.plusReady(function(){
        vm.receiveParams()
      });

    },
    methods: {
//获取上个页面的信息fun
      receiveParams: function() {
        var sf = plus.webview.currentWebview();
        this.currentShopObj = sf.currentShopObj;
        this.storeId = sf.storeId
        this.storeName = sf.storeName
        this.toDate = sf.toDate
        this.fromDate = sf.fromDate
        this.actnum  = sf.actnum
        this.dateType  = sf.dateType
      },
      toATMDetails:function(item){
        var  vm=this;
        var titleText=vm.dateType ===0 ? vm.fromDate : vm.fromDate+'至'+vm.toDate
        mui.openWindow({
          url: 'coinATMDetails.html',
          id: 'coinATMDetails',
          styles: {
            titleNView: {
              titleText:titleText,
              titleColor: "#FFFFFF",
              titleSize: "14px",
              backgroundColor: "#FF6800",
              autoBackButton: true,
              splitLine: {
                color: "#CCCCCC",
                height: "1px"
              }
            }
          },
          extras: {
            storeId: vm.storeId,
            storeName: vm.storeName,
            fromDate: vm.fromDate,
            toDate: vm.toDate,
            dateType:vm.dateType,    //0 日 1 周 2 月
            actnum:vm.actnum, //0 日 1 周 2 月
            lastTime:item.date,
            deviceSn:item.deviceSn,
            deviceState:item.state,
            deviceName:item.deviceName,
          }
        });
      },
      localData:function(){
        this.isLoading=true
        var  vm=this;
        config.ajax({
          url:'/atmReport/getAtmList',
          data:{
            "type":vm.dateType,
            "fromDate":new Date(vm.fromDate).format('yyyyMMdd') ,
            "toDate":new Date(vm.toDate).format('yyyyMMdd'),
            "storeId":vm.storeId
          },
          success:function(res){
            if(res.result ===1){
              console.log('ATMlist:')
            	console.log(JSON.stringify(res))
              vm.originalData=res.data;
              vm.ATMlist=res.data.atmList;
              vm.storePayType = res.data.storePayType;
              vm.isAlltypeNoMoney = res.data.totalWeChatMoney===0&&res.data.totalShouqianba===0;
              vm.isAlltypeHaveMoney = res.data.totalWeChatMoney>0&&res.data.totalShouqianba>0;
              vm.getMealInfo()

            }
          },
          error:function(res){
            mui.toast(res.data.errormsg)
          }

        })
      },
      changeInterType:function(type){
        var  dom=document.getElementsByClassName('radio1')
        var  vm=this
        if(this.isCheck !== type){
          if(type === 1){
            dom[0].checked = true;
            dom[1].checked = false;
            vm.isCheck=1
          }else if(type === 2){
            dom[1].checked = true;
            dom[0].checked = false;
            vm.isCheck=2
          }
        }


      },
      changeOutType:function(outType){
        if(this.outType !== outType){
          this.outType=outType
        }
      },
      getMealInfo:function(){
        console.log(JSON.stringify({
//            "type":vm.dateType,
          "fromDate":new Date(vm.fromDate).format('yyyyMMdd') ,
          "toDate":new Date(vm.toDate).format('yyyyMMdd'),
          "storeId":vm.storeId
        }))
        config.ajax({
          url:'/atmReport/getSaleReport',
          data:{
//            "type":vm.dateType,
            "fromDate":new Date(vm.fromDate).format('yyyyMMdd') ,
            "toDate":new Date(vm.toDate).format('yyyyMMdd'),
            "storeId":vm.storeId
          },
          success:function(res){
            console.log(JSON.stringify(res))
            if(res.result ===1){
              setTimeout(function(){
                vm.isLoading=false
              },500)
              vm.mealInfo=res.data
            }
          },
          error:function(res){
          }
        })
      }
    },
    watch: {
      fromDate: function() {
        this.localData()
      },
    }
  })
</script>
</body>

</html>